package com.ihr360.oneclick.dao;

import com.ihr360.oneclick.dto.SalaryTypeSettingDto;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface SalaryTypeDao extends JpaRepository<SalaryTypeSettingDto, String> {

    List<SalaryTypeSettingDto> findByCompanyIdOrderByCreatedAtDesc(String companyId);

    List<SalaryTypeSettingDto> findByCompanyIdAndReferIdIsNullOrderByCreatedAtDesc(String companyId);

    List<SalaryTypeSettingDto> findByCompanyIdAndTypeName(String companyId, String typeName);

    List<SalaryTypeSettingDto> findByCompanyIdAndReferId(String companyId, String referId);

    void deleteByIdIn(List<String> idList);

}
